﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace HamcoWcs.DAL.Migrations
{
    public partial class A13 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "DeviceName",
                table: "device_error_queue",
                newName: "MachineName");

            migrationBuilder.AddColumn<string>(
                name: "ErrorLevel",
                table: "device_error_queue",
                type: "varchar(30)",
                maxLength: 30,
                nullable: false,
                defaultValue: "",
                comment: "异常等级")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "PortName",
                table: "device_error_queue",
                type: "varchar(30)",
                maxLength: 30,
                nullable: false,
                defaultValue: "",
                comment: "Port名")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ErrorLevel",
                table: "device_error_queue");

            migrationBuilder.DropColumn(
                name: "PortName",
                table: "device_error_queue");

            migrationBuilder.RenameColumn(
                name: "MachineName",
                table: "device_error_queue",
                newName: "DeviceName");
        }
    }
}
